from sklearn_benchmarks.reporting.hp_match import HPMatchReporting
reporting = HPMatchReporting(against_lib="onnx", config="config.yml")
reporting.make_report()
We assume here there is a perfect match between the hyperparameters of both librairies. For a given set of parameters and a given dataset, we compute the speedup
time scikit-learn / time onnx. For instance, a speedup of 2 means that onnx is twice as fast as scikit-learn for a given set of parameters and a given dataset.
KNeighborsClassifier_brute_force¶onnx (1.10.1) vs. scikit-learn (1.0.dev0)
All estimators share the following parameters: algorithm=brute.
| estimator | function | n_samples_train | n_samples | n_features | accuracy_score_sklearn | accuracy_score_onnx | diff_accuracy_scores | |
|---|---|---|---|---|---|---|---|---|
| 1 | KNeighborsClassifier_brute_force | predict | 100000 | 1000 | 100 | 0.663 | 1.000 | 0.337 |
| 2 | KNeighborsClassifier_brute_force | predict | 100000 | 1 | 100 | 1.000 | 0.757 | 0.243 |
| 4 | KNeighborsClassifier_brute_force | predict | 100000 | 1000 | 100 | 0.757 | 0.882 | 0.125 |
| 7 | KNeighborsClassifier_brute_force | predict | 100000 | 1000 | 100 | 0.882 | 1.000 | 0.118 |
| 8 | KNeighborsClassifier_brute_force | predict | 100000 | 1 | 100 | 1.000 | 0.757 | 0.243 |
| 10 | KNeighborsClassifier_brute_force | predict | 100000 | 1000 | 100 | 0.882 | 0.663 | 0.219 |
| 13 | KNeighborsClassifier_brute_force | predict | 100000 | 1000 | 100 | 0.757 | 1.000 | 0.243 |
| 14 | KNeighborsClassifier_brute_force | predict | 100000 | 1 | 100 | 1.000 | 0.922 | 0.078 |
| 16 | KNeighborsClassifier_brute_force | predict | 100000 | 1000 | 100 | 0.663 | 0.929 | 0.266 |
| 19 | KNeighborsClassifier_brute_force | predict | 100000 | 1000 | 2 | 0.896 | 1.000 | 0.104 |
| 20 | KNeighborsClassifier_brute_force | predict | 100000 | 1 | 2 | 1.000 | 0.922 | 0.078 |
| 22 | KNeighborsClassifier_brute_force | predict | 100000 | 1000 | 2 | 0.922 | 0.896 | 0.026 |
| estimator | function | n_samples_train | n_samples | n_features | mean_duration_sklearn | std_duration_sklearn | iteration_throughput | latency | n_jobs | n_neighbors | mean_duration_onnx | std_duration_onnx | accuracy_score_onnx | speedup | std_speedup | sklearn_profiling | onnx_profiling | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | KNeighborsClassifier_brute_force | fit | 100000 | 100000 | 100 | 0.012 | 0.0 | 6.729 | 0.0 | -1 | 1 | 17.049 | 0.123 | 0.663 | 0.001 | 0.001 | See | See |
| 3 | KNeighborsClassifier_brute_force | fit | 100000 | 100000 | 100 | 0.012 | 0.0 | 6.908 | 0.0 | -1 | 5 | 0.316 | 0.004 | 1.000 | 0.037 | 0.037 | See | See |
| 6 | KNeighborsClassifier_brute_force | fit | 100000 | 100000 | 100 | 0.012 | 0.0 | 6.794 | 0.0 | 1 | 100 | 17.214 | 0.019 | 0.882 | 0.001 | 0.001 | See | See |
| 9 | KNeighborsClassifier_brute_force | fit | 100000 | 100000 | 100 | 0.012 | 0.0 | 6.831 | 0.0 | -1 | 100 | 0.317 | 0.006 | 1.000 | 0.037 | 0.037 | See | See |
| 12 | KNeighborsClassifier_brute_force | fit | 100000 | 100000 | 100 | 0.012 | 0.0 | 6.884 | 0.0 | 1 | 5 | 3.769 | 0.010 | 0.896 | 0.003 | 0.003 | See | See |
| 15 | KNeighborsClassifier_brute_force | fit | 100000 | 100000 | 100 | 0.012 | 0.0 | 6.663 | 0.0 | 1 | 1 | 0.239 | 0.003 | 1.000 | 0.050 | 0.050 | See | See |
| 18 | KNeighborsClassifier_brute_force | fit | 100000 | 100000 | 2 | 0.004 | 0.0 | 0.377 | 0.0 | -1 | 1 | 3.750 | 0.008 | 0.929 | 0.001 | 0.001 | See | See |
| 21 | KNeighborsClassifier_brute_force | fit | 100000 | 100000 | 2 | 0.004 | 0.0 | 0.379 | 0.0 | -1 | 5 | 0.240 | 0.004 | 1.000 | 0.018 | 0.018 | See | See |
| estimator | function | n_samples_train | n_samples | n_features | mean_duration_sklearn | std_duration_sklearn | iteration_throughput | latency | n_jobs | n_neighbors | mean_duration_onnx | std_duration_onnx | accuracy_score_onnx | speedup | std_speedup | sklearn_profiling | onnx_profiling | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | KNeighborsClassifier_brute_force | predict | 100000 | 1000 | 100 | 1.969 | 0.081 | 0.000 | 0.002 | -1 | 1 | 0.315 | 0.004 | 1.000 | 6.249 | 6.250 | See | See |
| 2 | KNeighborsClassifier_brute_force | predict | 100000 | 1 | 100 | 0.023 | 0.002 | 0.000 | 0.023 | -1 | 1 | 17.135 | 0.199 | 0.757 | 0.001 | 0.001 | See | See |
| 4 | KNeighborsClassifier_brute_force | predict | 100000 | 1000 | 100 | 2.849 | 0.043 | 0.000 | 0.003 | -1 | 5 | 16.983 | 0.068 | 0.882 | 0.168 | 0.168 | See | See |
| 5 | KNeighborsClassifier_brute_force | predict | 100000 | 1 | 100 | 0.025 | 0.002 | 0.000 | 0.025 | -1 | 5 | 0.317 | 0.007 | 1.000 | 0.078 | 0.078 | See | See |
| 7 | KNeighborsClassifier_brute_force | predict | 100000 | 1000 | 100 | 2.051 | 0.041 | 0.000 | 0.002 | 1 | 100 | 0.317 | 0.004 | 1.000 | 6.479 | 6.479 | See | See |
| 8 | KNeighborsClassifier_brute_force | predict | 100000 | 1 | 100 | 0.025 | 0.004 | 0.000 | 0.025 | 1 | 100 | 17.162 | 0.152 | 0.757 | 0.001 | 0.001 | See | See |
| 10 | KNeighborsClassifier_brute_force | predict | 100000 | 1000 | 100 | 2.849 | 0.052 | 0.000 | 0.003 | -1 | 100 | 17.359 | 0.024 | 0.663 | 0.164 | 0.164 | See | See |
| 11 | KNeighborsClassifier_brute_force | predict | 100000 | 1 | 100 | 0.025 | 0.003 | 0.000 | 0.025 | -1 | 100 | 0.307 | 0.006 | 1.000 | 0.082 | 0.082 | See | See |
| 13 | KNeighborsClassifier_brute_force | predict | 100000 | 1000 | 100 | 2.025 | 0.003 | 0.000 | 0.002 | 1 | 5 | 0.239 | 0.004 | 1.000 | 8.470 | 8.471 | See | See |
| 14 | KNeighborsClassifier_brute_force | predict | 100000 | 1 | 100 | 0.022 | 0.000 | 0.000 | 0.022 | 1 | 5 | 3.711 | 0.010 | 0.922 | 0.006 | 0.006 | See | See |
| 16 | KNeighborsClassifier_brute_force | predict | 100000 | 1000 | 100 | 1.177 | 0.012 | 0.001 | 0.001 | 1 | 1 | 3.753 | 0.009 | 0.929 | 0.314 | 0.314 | See | See |
| 17 | KNeighborsClassifier_brute_force | predict | 100000 | 1 | 100 | 0.021 | 0.000 | 0.000 | 0.021 | 1 | 1 | 0.239 | 0.005 | 1.000 | 0.086 | 0.086 | See | See |
| 19 | KNeighborsClassifier_brute_force | predict | 100000 | 1000 | 2 | 1.806 | 0.027 | 0.000 | 0.002 | -1 | 1 | 0.240 | 0.004 | 1.000 | 7.528 | 7.529 | See | See |
| 20 | KNeighborsClassifier_brute_force | predict | 100000 | 1 | 2 | 0.006 | 0.005 | 0.000 | 0.006 | -1 | 1 | 3.720 | 0.008 | 0.922 | 0.002 | 0.002 | See | See |
| 22 | KNeighborsClassifier_brute_force | predict | 100000 | 1000 | 2 | 2.691 | 0.023 | 0.000 | 0.003 | -1 | 5 | 3.764 | 0.006 | 0.896 | 0.715 | 0.715 | See | See |
| 23 | KNeighborsClassifier_brute_force | predict | 100000 | 1 | 2 | 0.006 | 0.003 | 0.000 | 0.006 | -1 | 5 | 0.239 | 0.005 | 1.000 | 0.027 | 0.027 | See | See |
KNeighborsClassifier_kd_tree¶onnx (1.10.1) vs. scikit-learn (1.0.dev0)
All estimators share the following parameters: algorithm=kd_tree.
| estimator | function | n_samples_train | n_samples | n_features | accuracy_score_sklearn | accuracy_score_onnx | diff_accuracy_scores | |
|---|---|---|---|---|---|---|---|---|
| 1 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1000 | 10 | 0.929 | 1.000 | 0.071 |
| 2 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1 | 10 | 1.000 | 0.946 | 0.054 |
| 4 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1000 | 10 | 0.946 | 0.951 | 0.005 |
| 7 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1000 | 10 | 0.951 | 1.000 | 0.049 |
| 8 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1 | 10 | 1.000 | 0.946 | 0.054 |
| 10 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1000 | 10 | 0.951 | 0.929 | 0.022 |
| 13 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1000 | 10 | 0.946 | 1.000 | 0.054 |
| 14 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1 | 10 | 1.000 | 0.911 | 0.089 |
| 16 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1000 | 10 | 0.929 | 0.894 | 0.035 |
| 19 | KNeighborsClassifier_kd_tree | predict | 1000 | 1000 | 2 | 0.891 | 1.000 | 0.109 |
| 20 | KNeighborsClassifier_kd_tree | predict | 1000 | 1 | 2 | 1.000 | 0.911 | 0.089 |
| 22 | KNeighborsClassifier_kd_tree | predict | 1000 | 1000 | 2 | 0.911 | 0.891 | 0.020 |
| estimator | function | n_samples_train | n_samples | n_features | mean_duration_sklearn | std_duration_sklearn | iteration_throughput | latency | n_jobs | n_neighbors | mean_duration_onnx | std_duration_onnx | accuracy_score_onnx | speedup | std_speedup | sklearn_profiling | onnx_profiling | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | KNeighborsClassifier_kd_tree | fit | 1000000 | 1000000 | 10 | 3.191 | 0.145 | 0.025 | 0.0 | -1 | 1 | 107.463 | 0.00 | 0.929 | 0.030 | 0.030 | See | See |
| 3 | KNeighborsClassifier_kd_tree | fit | 1000000 | 1000000 | 10 | 3.730 | 0.104 | 0.021 | 0.0 | -1 | 5 | 2.605 | 0.16 | 1.000 | 1.432 | 1.435 | See | See |
| 6 | KNeighborsClassifier_kd_tree | fit | 1000000 | 1000000 | 10 | 3.731 | 0.124 | 0.021 | 0.0 | 1 | 100 | 104.490 | 0.00 | 0.951 | 0.036 | 0.036 | See | See |
| 9 | KNeighborsClassifier_kd_tree | fit | 1000000 | 1000000 | 10 | 4.036 | 0.055 | 0.020 | 0.0 | -1 | 100 | 2.621 | 0.15 | 1.000 | 1.540 | 1.542 | See | See |
| 12 | KNeighborsClassifier_kd_tree | fit | 1000000 | 1000000 | 10 | 3.750 | 0.041 | 0.021 | 0.0 | 1 | 5 | 0.038 | 0.00 | 0.891 | 98.562 | 98.565 | See | See |
| 15 | KNeighborsClassifier_kd_tree | fit | 1000000 | 1000000 | 10 | 3.710 | 0.037 | 0.022 | 0.0 | 1 | 1 | 0.005 | 0.00 | 1.000 | 727.161 | 727.277 | See | See |
| 18 | KNeighborsClassifier_kd_tree | fit | 1000 | 1000 | 2 | 0.001 | 0.001 | 0.020 | 0.0 | -1 | 1 | 0.060 | 0.00 | 0.894 | 0.013 | 0.013 | See | See |
| 21 | KNeighborsClassifier_kd_tree | fit | 1000 | 1000 | 2 | 0.001 | 0.000 | 0.031 | 0.0 | -1 | 5 | 0.005 | 0.00 | 1.000 | 0.101 | 0.101 | See | See |
| estimator | function | n_samples_train | n_samples | n_features | mean_duration_sklearn | std_duration_sklearn | iteration_throughput | latency | n_jobs | n_neighbors | mean_duration_onnx | std_duration_onnx | accuracy_score_onnx | speedup | std_speedup | sklearn_profiling | onnx_profiling | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1000 | 10 | 0.818 | 0.964 | 0.000 | 0.001 | -1 | 1 | 2.612 | 0.197 | 1.000 | 0.313 | 0.314 | See | See |
| 2 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1 | 10 | 0.002 | 0.001 | 0.000 | 0.002 | -1 | 1 | 105.443 | 0.000 | 0.946 | 0.000 | 0.000 | See | See |
| 4 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1000 | 10 | 1.013 | 0.282 | 0.000 | 0.001 | -1 | 5 | 106.188 | 0.000 | 0.951 | 0.010 | 0.010 | See | See |
| 5 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1 | 10 | 0.003 | 0.001 | 0.000 | 0.003 | -1 | 5 | 2.587 | 0.116 | 1.000 | 0.001 | 0.001 | See | See |
| 7 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1000 | 10 | 5.678 | 0.240 | 0.000 | 0.006 | 1 | 100 | 2.616 | 0.136 | 1.000 | 2.171 | 2.173 | See | See |
| 8 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1 | 10 | 0.004 | 0.001 | 0.000 | 0.004 | 1 | 100 | 104.729 | 0.000 | 0.946 | 0.000 | 0.000 | See | See |
| 10 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1000 | 10 | 3.289 | 0.184 | 0.000 | 0.003 | -1 | 100 | 106.575 | 0.000 | 0.929 | 0.031 | 0.031 | See | See |
| 11 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1 | 10 | 0.005 | 0.001 | 0.000 | 0.005 | -1 | 100 | 2.601 | 0.136 | 1.000 | 0.002 | 0.002 | See | See |
| 13 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1000 | 10 | 1.652 | 0.158 | 0.000 | 0.002 | 1 | 5 | 0.005 | 0.000 | 1.000 | 328.204 | 328.280 | See | See |
| 14 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1 | 10 | 0.002 | 0.001 | 0.000 | 0.002 | 1 | 5 | 0.040 | 0.001 | 0.911 | 0.038 | 0.038 | See | See |
| 16 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1000 | 10 | 0.925 | 0.191 | 0.000 | 0.001 | 1 | 1 | 0.060 | 0.002 | 0.894 | 15.372 | 15.378 | See | See |
| 17 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1 | 10 | 0.001 | 0.000 | 0.000 | 0.001 | 1 | 1 | 0.005 | 0.000 | 1.000 | 0.201 | 0.201 | See | See |
| 19 | KNeighborsClassifier_kd_tree | predict | 1000 | 1000 | 2 | 0.026 | 0.012 | 0.001 | 0.000 | -1 | 1 | 0.005 | 0.000 | 1.000 | 5.108 | 5.109 | See | See |
| 20 | KNeighborsClassifier_kd_tree | predict | 1000 | 1 | 2 | 0.002 | 0.000 | 0.000 | 0.002 | -1 | 1 | 0.039 | 0.000 | 0.911 | 0.051 | 0.051 | See | See |
| 22 | KNeighborsClassifier_kd_tree | predict | 1000 | 1000 | 2 | 0.023 | 0.002 | 0.001 | 0.000 | -1 | 5 | 0.039 | 0.001 | 0.891 | 0.589 | 0.589 | See | See |
| 23 | KNeighborsClassifier_kd_tree | predict | 1000 | 1 | 2 | 0.002 | 0.000 | 0.000 | 0.002 | -1 | 5 | 0.005 | 0.000 | 1.000 | 0.377 | 0.377 | See | See |
HistGradientBoostingClassifier_best¶onnx (1.10.1) vs. scikit-learn (1.0.dev0)
All estimators share the following parameters: learning_rate=0.01, n_iter_no_change=10.0, max_leaf_nodes=100.0, max_bins=255.0, min_samples_leaf=100.0, max_iter=300.0.
| estimator | function | n_samples_train | n_samples | n_features | accuracy_score_sklearn | accuracy_score_onnx | diff_accuracy_scores | |
|---|---|---|---|---|---|---|---|---|
| 1 | HistGradientBoostingClassifier_best | predict | 100000 | 1000 | 100 | 0.824 | 1.0 | 0.176 |
| estimator | function | n_samples_train | n_samples | n_features | mean_duration_sklearn | std_duration_sklearn | n_iter | iteration_throughput | latency | mean_duration_onnx | std_duration_onnx | accuracy_score_onnx | speedup | std_speedup | sklearn_profiling | onnx_profiling | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | HistGradientBoostingClassifier_best | fit | 100000 | 100000 | 100 | 97.843 | 0.0 | 300 | 0.001 | 0.001 | 0.504 | 0.02 | 0.824 | 194.184 | 194.343 | See | See |
| estimator | function | n_samples_train | n_samples | n_features | mean_duration_sklearn | std_duration_sklearn | n_iter | iteration_throughput | latency | mean_duration_onnx | std_duration_onnx | accuracy_score_onnx | speedup | std_speedup | sklearn_profiling | onnx_profiling | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | HistGradientBoostingClassifier_best | predict | 100000 | 1000 | 100 | 0.114 | 0.002 | 300 | 0.007 | 0.0 | 0.421 | 0.01 | 1.0 | 0.27 | 0.27 | See | See |